package com.example.demothree.controller;

import com.example.demothree.service.LoginService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("log")
public class LoginoutController {
    //thymeleaf全局的储存信息的空间
    @Resource
    private LoginService loginService;
    @RequestMapping("out")
    public String loginout(HttpServletRequest request) {
        loginService.outLogin(request);
        return "login";
    }
}
